<?php $this->headLink()->appendStylesheet($this->baseUrl().'/lightbox/css/jquery.lightbox-0.5.css') ?>
<?php $this->headScript()->appendFile($this->baseUrl().'/lightbox/js/jquery.lightbox-0.5.js') ?>
<script type="text/javascript">
    $(function() {
	$('.product-image a').lightBox({fixedNavigation:true});
});
</script>
<div class="product-image">
    <?php $pathImage = $this->imagePath('products', 
            $this->productImages[0]['product_image_id'], 
            $this->productImages[0]['path']); ?>
    <a href="/upload/<?php echo $pathImage ?>"><img src="/upload/<?php echo $pathImage ?>"/>
    </a>
    <?php if(count($this->productImages) > 1): ?>
    <div>
        <?php $otherImages = array_slice($this->productImages->toArray(), 1) ?>
        <?php foreach($otherImages as $image): ?>
            <?php $pathImage = $this->imagePath('products', 
                $image['product_image_id'], 
                $image['path']); ?>
        <div class="image-item">
                <a href="/upload/<?php echo $pathImage ?>"><img src="/upload/<?php echo $pathImage ?>"/>
                </a>
            </div>
        <?php endforeach; ?>
    </div>
    <?php endif ?>
</div>
